package com.qf.Simple_queue;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * author:z
 * time:2021/12/16 18:50
 * description:
 */
@Component
@RabbitListener(queues = "simple_queue")
public class SimpleListener {

    //mag:队列中的数据
    @RabbitHandler
    public void onMessage(String msg){
        System.out.println("消息队列中的数据："+msg);
    }
}
